// EnemyFactory.cpp
#include "EnemyFactory.h"

Enemy* EnemyFactory::createEnemy(EnemyType type, QObject* parent) {
    switch (type) {
    case BOMBER: return new BomberEnemy(parent);
    case FIGHTER: return new FighterEnemy(parent);
    default: return nullptr;
    }
}

Enemy* EnemyFactory::createRandomEnemy(QObject* parent) {
    int t = QRandomGenerator::global()->bounded(2);
    return createEnemy(static_cast<EnemyType>(t), parent);
}
